﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data;
using DTO;
namespace DAL
{
    public class HocSinh_DAL
    {
        static OleDbConnection KN;
        static object MaLop;
        public static DataTable LayDuLieuCmb()
        {
            string sChuoiTruyVan = string.Format("select * from Lop");
            KN = DataProvider.KetNoi();
            DataTable dtLop=DataProvider.LayDuLieuDataTable(sChuoiTruyVan,KN);
            DataProvider.DongKetNoi(KN);
            return dtLop;
        }
        public static DataTable LoadDSSV()
        {
            string sChuoiTruyVan = string.Format("select * from SinhVien");
            //Mo ket noi;
            KN = DataProvider.KetNoi();
            //Lay du lieu tu csdl do vao datatable
            DataTable dtDSSV = DataProvider.LayDuLieuDataTable(sChuoiTruyVan, KN);
            //Ngat Ket noi
            DataProvider.DongKetNoi(KN);
            return dtDSSV;
        }



        public static DataTable LoadDuLieuCMB()
        {
            throw new NotImplementedException();
        }
    }
}
